/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-07-16     MBW       the first version
 */
#ifndef MY_HARDWARE_PPM_H_
#define MY_HARDWARE_PPM_H_
#include "board.h"
#include "sys.h"
#include "math.h"
//#define led_Y   PBout(2)
//#define led_Y   PCout(1)
extern u16 channel_1  ;
extern u16 channel_2  ;
extern u16 channel_3   ;
extern u16 channel_4   ;
extern u16 channel_5   ;
extern u16 channel_6   ;
extern u16 channel_7   ;
extern u16 channel_8   ;
extern u16 channel_9   ;
extern u16 channel_10 ;
extern u16 channel_11  ;
extern u16 channel_12  ;
typedef struct
{
    u8 T3_CAP1_STA;
    u8 T5_CAP2_STA;
    u8 T5_CAP3_STA;
    u8 T5_CAP4_STA;
    u16 T1_CAP1_VAL;
    u16 T5_CAP2_VAL;
    u16 T5_CAP3_VAL;
    u16 T5_CAP4_VAL;
    u16 T1_CAP1_VAL2;
    u16 T5_CAP2_VAL2;
    u16 T5_CAP3_VAL2;
    u16 T5_CAP4_VAL2;
    u16 PPM1_RES;
    u16 PPM2_RES;
    u16 PPM3_RES;
    u16 PPM4_RES;
    float PPM1;
    float PPM2;
    float PPM3;
    float PPM4;
    u8 power_sw;
}PPM_val;
typedef struct
{
    float PPM_pitch;
    float PPM_roll;
    float PPM_yaw;
    float PPM_thrust;
}PPM_CONTROL;
extern PPM_val PPM_FLIGHT;
extern PPM_CONTROL PPM_con;
void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* htim_ic);
#endif /* MY_HARDWARE_PPM_H_ */
